#include "stdio.h"
#include "string.h"
main()
{
	int gl[32][32];
	int i,j,num;
	int g,l;


	memset(gl,0,sizeof(gl));

	for (i=0;i<=30;i++) gl[i][0]=i;
	for (i=0;i<=30;i++) gl[1][i]=1;
	
	for (i=2;i<=30;i++)
		for (j=0;j<=30;j++)
		{
			gl[i][j]=gl[i-1][j-1]+gl[i-1][j]+1;
		}

	num=0;
	scanf("%d%d",&g,&l);
	while (g||l)
	{
		printf("Case %d: %d\n",++num,gl[g][l]);
		scanf("%d%d",&g,&l);
	}


}
